<?php
/**
 * 文章页
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package 古槐乡情
 * @subpackage 2017-01
 * @since 1.0
 * @version 1.0
 */

get_header(); ?>
<div style="overflow:hidden; width:0px; height:0; margin:0 auto; position:absolute; top:-800px;">
	<img src="<?php echo catch_that_image(); ?>" width="0" height="0" />
</div>
 <div class="row">
	<div class="single-title">
		<h2><?php the_title(); ?></h2>
		<?php $category = get_the_category(); ?>
		<footer><?php echo $category[0]->cat_name;?> / <?php the_time('Y-m-d'); ?></footer>
	</div>
	<div class="col-md-offset-5 col-md-5">
        <div class="post-like">
            <a href="javascript:;" data-action="ding" data-id="<?php the_ID(); ?>" class="favorite<?php if(isset($_COOKIE['bigfa_ding_'.$post->ID])) echo ' done';?>">
                <i class="glyphicon glyphicon-thumbs-up"></i>&nbsp;赞<span class="count">
                    <?php if( get_post_meta($post->ID,'bigfa_ding',true) ){
                    echo get_post_meta($post->ID,'bigfa_ding',true);
                    } else {
                    echo '0';
                    }?>
                </span>
            </a>
        </div>
        <div class="post-like">
            <a tabindex="0" role="button" data-toggle="popover" data-trigger="focus" data-placement="bottom" title="微信二维码"><i class="glyphicon glyphicon-qrcode"></i>&nbsp;微信分享</a>
        </div>

        <div id="LinkDIV" style="float:left;width:200px;display:none;">
            <img src="http://api.qrserver.com/v1/create-qr-code/?size=200x200&data=<?php the_permalink(); ?>" alt="QR:  <?php the_title(); ?>" />
        </div>
    </div>
    <div style="clear:both"></div>
	<div class="intro">
		<?php while (have_posts()) : the_post(); ?>
		　　　<?php the_content(); ?>
		<?php endwhile; ?>
	</div>
	<div class="entry">
		    <a href="http://www.xianhall.com">古槐乡情(www.xianhall.com)</a>尊重原创作者及版权，转载请注明作者与出处。
	</div>
</div>

<script src="//cdn.bootcss.com/bootstrap/4.0.0-alpha.2/js/umd/popover.js"></script>
<script type="text/javascript">
	$(function () {
		//弹出微信二维码
	  	$('[data-toggle="popover"]').popover(options);
	})

	var options={
		html: true,
		content:$("#LinkDIV").html()
	};

</script>
<?php get_footer(); ?>